import pandas as pd

# 创建数据字典
data = {
    '不同注意力机制模型': ['no attention', 'words attention', 'news attention', 'both attention'],
    'nDCG': [0.7438, 0.8156, 0.7457, 0.8206],
    'MRR': [0.6628, 0.6628, 0.7726, 0.7819]
}

# 创建DataFrame
df = pd.DataFrame(data)

# 将DataFrame写入Excel文件
df.to_excel('attention_performance.xlsx', index=False)